import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import {IonicStorageModule} from '@ionic/storage';
import { MyApp } from './app.component';


import { TabsPage } from '../pages/tabs/tabs';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { ParkListPage } from '../pages/park-list/park-list';
import { ParkMapPage } from '../pages/park-map/park-map';
import { ParkDataProvider } from '../providers/park-data/park-data';
import { HttpClientModule } from '@angular/common/http';
import { ParkDetailPage } from '../pages/park-detail/park-detail';
import { SqliteHelperProvider } from '../providers/sqlite-helper/sqlite-helper';
import { UserSettingProvider } from '../providers/user-setting/user-setting';
import { SQLite } from '@ionic-native/sqlite';
import { LoginDataProvider } from '../providers/login-data/login-data';
import { LoginPage } from '../pages/login/login';
import { MyPage } from '../pages/my/my';
import { AboutPage } from '../pages/about/about';
import { ParkSidemenuPage } from '../pages/park-sidemenu/park-sidemenu';
import { CommentDataProvider } from '../providers/comment-data/comment-data';
import { ParkCommentPage } from '../pages/park-comment/park-comment';
import { ComponentsModule } from '../components/components.module';

@NgModule({
  declarations: [
    MyApp,
  ParkListPage,
  ParkMapPage,
  ParkDetailPage,
    TabsPage,
    LoginPage,
    MyPage,
    AboutPage,
    ParkSidemenuPage,
    ParkCommentPage
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    ComponentsModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    ParkListPage,
    ParkMapPage,
    ParkDetailPage,
    TabsPage,
    LoginPage,
    MyPage,
    AboutPage,
    ParkSidemenuPage,
    ParkCommentPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    SQLite,
    ParkDataProvider,
    SqliteHelperProvider,
    UserSettingProvider,
    LoginDataProvider,
    CommentDataProvider
  ]
})
export class AppModule {}